<template>
  <ButtonGroup :title="`${configKey === 'titleColor' ? '标题' : '描述'}颜色`" :status="status">
    <el-color-picker @change="changeColor" v-model="color" />
  </ButtonGroup>
</template>
<script setup>
import { inject, ref } from 'vue';
import ButtonGroup from './ButtonGroup.vue';
const props = defineProps({
  status: String,
  configKey: String,
});

const updateStatus = inject('updateStatus',()=>{});
const color = ref(props.status);
const changeColor = (pos) => {
  if (updateStatus) {
    updateStatus(props.configKey, pos);
  }
};
</script>
